//
//  SLMediatorManager+SLMain.m
//  SLBSMainKit
//
//  Created by CoderSLZeng on 2017/12/1.
//  Copyright © 2017年 CoderSLZeng. All rights reserved.
//

#import "SLMediatorManager+SLMain.h"

@implementation SLMediatorManager (SLMain)

+ (UIViewController *)rootViewController
{
    return [self performTarget:@"MainModuleAPI" action:@"rootViewController" params:nil isRequiredReturnValue:YES];
}

+ (void)showTopWindow
{
    [self performTarget:@"MainModuleAPI" action:@"showTopWindow" params:nil isRequiredReturnValue:NO];
}


+ (void)setupLaunchImageWithImageNamed:(NSString *)name
{
    [self performTarget:@"MainModuleAPI" action:@"setupLaunchImageWithImageNamed:" params:name isRequiredReturnValue:NO];
}


+ (void)loadAdDataWithRequestURLString:(NSString *)string Parameters:(NSMutableDictionary *)parameters
{
    NSArray *paramArr = @[string, parameters];
    [self performTarget:@"MainModuleAPI" action:@"loadAdDataWithParameters:" params:paramArr isRequiredReturnValue:NO];
}
    
+ (void)setNavBarGlobalBackGroundImage:(UIImage *)globalImg
{
    [self performTarget:@"MainModuleAPI" action:@"setNavBarGlobalBackGroundImage:" params:globalImg isRequiredReturnValue:NO];
}

+ (void)addChildVC:(UIViewController *)vc title:(NSString *)title normalImageName: (NSString *)normalImageName selectedImageName:(NSString *)selectedImageName isRequiredNavController: (BOOL)isRequired
{
    NSArray *paramArr = @[vc, title, normalImageName, selectedImageName, @(isRequired)];
    [self performTarget:@"MainModuleAPI" action:@"addChildVCWithParameters:" params:paramArr isRequiredReturnValue:NO];
}
    
+ (void)setTabbarMiddleBtnClick:(void(^)(void))middleClickBlock
{
    [self performTarget:@"MainModuleAPI" action:@"setTabbarMiddleBtnClick:" params:middleClickBlock isRequiredReturnValue:NO];
}
@end
